package com.ibiaoke.order.service;

import com.ibiaoke.common.base.Page;
import com.ibiaoke.customer.entity.Customer;
import com.ibiaoke.customer.entity.ThirdPartLogin;
import com.ibiaoke.customer.entity.XcxOpenGroup;
import com.ibiaoke.order.entity.XcxOrder;
import com.ibiaoke.order.entity.so.SubmitOrderSO;
import com.ibiaoke.order.entity.so.XcxOrderSO;
import com.ibiaoke.order.entity.vo.DateAnalysisVO;
import com.ibiaoke.order.entity.vo.XcxOrderVO;
import sun.rmi.runtime.Log;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * @author Healer
 * @date 2018/3/7/16:55;
 */
public interface XcxOrderService {

    List<XcxOrder> xcxOrderList(XcxOrderVO xcxOrder, Page page);

    int ConfirmOrder(Customer customer, XcxOrder xcxOrder);

    int delXcxOrder(Customer customer, Integer orderId);

    XcxOrder getOrderById(Integer orderId);

    Long getOrderCountByStatus(Integer customerId, Integer status);

    /**
     * 开团
     */
    XcxOrder submitXcxGoodsOrder(Customer customer, Integer xcxGoodsId, Integer addressId,
                                 Integer deliveryType, ThirdPartLogin thirdPartLogin,
                                 Integer shopId,String remark,Integer expressPrice,Integer paymentType);


    /**
     * 拼团
     */
    XcxOrder joinXcxOpenGroup(XcxOpenGroup xcxOpenGroup, Customer customer,ThirdPartLogin thirdPartLogin,
                              Integer deliveryType, Integer addressId,Integer shopId,String remark,
                              Integer expressPrice,Integer paymentType);

    /**
     * 正常下单
     */
    XcxOrder XcxGoodsOrder(SubmitOrderSO submitOrderSO);

    void updateXcxOrderStatus(XcxOrder xcxOrder);

    void updateOrderStatus(XcxOrder xcxOrder);

    void updateOrderStatusByOnly(XcxOrder xcxOrder);

    void sendOrderMessage(XcxOrder xcxOrderInfo);

    void updateWaitPayXcxOrder();

    void xcxConfirmOrder();

    void updateOverTimeXcxPtOrder();

    void XcxPtPayRefund();

    void checkBeforePay(XcxOrder xcxOrder);

    XcxOrder getXcxOrderByOrderId(Integer xcxOrderId);

    HashMap<String, DateAnalysisVO> getTodayOrderData(XcxOrderSO xcxOrderSO, Page page) ;

    HashMap<String, DateAnalysisVO> getOrderAnalysis(XcxOrderSO xcxOrderSO, Page page);

    void XcxPtPayRefundByManual(XcxOrder xcxOrder);

    void sendPtOrderMessage(XcxOrder xcxOrder);

    Integer cancelOrder(Integer userId,Integer orderId);

    String aggregate(Integer serviceNum, Date startTime, Date endTime);

    List<XcxOrder> submitShoppingCartOrder(SubmitOrderSO submitOrderSO);
}
